<%inherit file="base.html"/>

<h2>${ project.name }</h2>
<div style="position: absolute; top: 5px; right: 5px;"><a href="/secure/">Project Listing</a></div>
<h3>Subprojects</h3>
% for subproject in project.subprojects:
	<div class="project subproject">
		<div class="title">${ subproject.name }</div>
		<div class="links">
			<a href="/secure/${ project.key().id_or_name() }/">settings</a>
			<a href="#configure_subproject">pivotal configuration info</a>
			<a target="_new" href="http://www.pivotaltracker.com/projects/${ subproject.pivotal_project_id }/integrations/">pivotal configuration</a>
		</div>
		<div class="info">
			<div class="info_line info_line1">${ subproject.activities_processed or 0 } Activities processed</div>
		</div>
	</div>
% endfor
<div class="controls">
	<a class="button add_button" href="/secure/${ project.key().id_or_name() }/addsubproject/">Add Subproject +</a>
</div>
<br /><br />
<a link="configure" />
<h3>Configure Master Backlog</h3>
<p>The PivotalTracker project that is being used as the master backlog must be configured with a web activity hook in the pivotal <a href="http://www.pivotaltracker.com/projects/${ project.pivotal_project_id }/integrations/">integration settings</a>.</p>

<p>The following configuration settings should be used for the <strong>Activity Web Hook</strong> configuration section:
	<table class="settings">
		<tr>
			<th>Setting</th>
			<th>Value</th>
		</tr>
		<tr>
			<td>Web Hook URL</td>
			<td class="tt">${base_url}/api/projects/${ project.key().id_or_name() }/master/</td>
		</tr>
		<tr>
			<td>API Version</td>
			<td class="tt">v3</td>
		</tr>
	</table>
</p>
<a link="configure_subproject" />
<h3>Configure Subprojects</h3>
<p>Each PivotalTracker project that is being used as a sub backlog must have both an integration source and a web activity hook configured.</p>
<p>
	The following configuration settings should be used for the <strong>Activity Web Hook</strong> configuration section of each subproject:
	<table class="settings">
		<tr>
			<th>Setting</th>
			<th>Value</th>
		</tr>
		<tr>
			<td>Web Hook URL</td>
			<td class="tt">${base_url}/api/projects/${ project.key().id_or_name() }/activity/</td>
		</tr>
		<tr>
			<td>API Version</td>
			<td class="tt">v3</td>
		</tr>
	</table>
</p>
<p>To add an integration source select <em>Other</em> from the <em>Create New Integration ...</em> drop-down in the <strong>External Tool Integrations</strong> configuration setting and enter the following values:
	<table class="settings">
		<tr>
			<th>Setting</th>
			<th>Value</th>
		</tr>
		<tr>
			<td>Name</td>
			<td>&lt;Name entered for integration when adding subproject to MasterControl&gt; (default is <span class="tt">MasterControl</span>)</td>
		</tr>
		<tr>
			<td>Basic Auth Username</td>
			<td>&lt;Leave Blank&gt;</td>
		</tr>
		<tr>
			<td>Basic Auth Password</td>
			<td>&lt;Leave Blank&gt;</td>
		</tr>
		<tr>
			<td>Base URL</td>
			<td class="tt">http://www.pivotaltracker.com/story/show/</td>
		</tr>
		<tr>
			<td>Import API URL</td>
			<td class="tt">${base_url}/api/projects/${ project.key().id_or_name() }/</td>
		</tr>
	</table>
</p>